

#import <UIKit/UIKit.h>
#import "ColorSwatchView.h"

@protocol ColorPickerViewDelegate <NSObject>

- (void)updateSwatchViewWithColor:(UIColor *) color;

@end

@class GradientView;
@interface ColorPickerView : UIView<UITextFieldDelegate> {
	GradientView *gradientView;
	//IBOutlet ColorSwatchView *showColor;
	IBOutlet UIImageView *crossHairs;
	IBOutlet UIImageView *brightnessBar;
	//Private vars
	CGRect colorMatrixFrame;
	
	CGFloat currentBrightness;
	CGFloat currentHue;
	CGFloat currentSaturation;
	
	UIColor *currentColor;
    
     IBOutlet UITextField *txtR, *txtG, *txtB, *txtHue, *txtSat, *txtVal, *txtHex, *txtCurrent;
    NSCharacterSet *hexCharacterSet, *decimalCharacterSet;
    BOOL isTextChanged;
}

@property (readwrite) CGFloat currentBrightness;
@property (readwrite) CGFloat currentHue;
@property (readwrite) CGFloat currentSaturation;
@property (nonatomic, assign) id<ColorPickerViewDelegate> updateSwatchViewDelegate;

- (UIColor *) getColorShown;
- (void) setColor:(UIColor *)color;
- (void) animateView:(UIImageView *)theView toPosition:(CGPoint) thePosition;
-(void) setUp;

@end
